package com.lmabbe.tenant.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lmabbe.tenant.objects.entity.SysDic;
import com.lmabbe.tenant.objects.entity.SysDicItem;
import com.lmabbe.tenant.objects.query.SysDicItemQuery;
import com.lmabbe.tenant.objects.vo.SysDicTreeVo;

import java.util.List;

/**
 * 系统字典
 *
 * @author lmabbe
 */
public interface SysDicService extends IService<SysDic> {

    /**
     * 条目列表
     *
     * @param dicId 字典ID
     * @return
     */
    IPage<SysDicItem> items(Long dicId, SysDicItemQuery query);

    /**
     * 条目详情
     *
     * @param itemId
     * @return
     */
    SysDicItem item(Long itemId);

    void delresource(Long itemId);

    void addItem(SysDicItem item);

    void editItem(SysDicItem resource);

    /**
     * 获取所有树形结构
     *
     * @return {@link Object}
     * @date 2022/1/4 12:04 PM
     * @author liming
     */
    List<SysDicTreeVo> allTree();
}
